package com.xing.service.role;

import com.xing.dao.BaseDao;
import com.xing.dao.role.RoleDao;
import com.xing.dao.role.RoleDaoImpl;
import com.xing.pojo.Role;
import org.junit.Test;

import java.sql.SQLException;
import java.util.List;

public class RoleServiceImpl implements RoleService{
    //引入Dao
    private RoleDao roleDao;
    public RoleServiceImpl() {
        roleDao = new RoleDaoImpl();
    }
    @Override
    public List<Role> getRoleList() throws SQLException, ClassNotFoundException {
        List<Role> roleList = null;
        BaseDao baseDao = new BaseDao();
        roleList = roleDao.getRoleList();
        baseDao.closeAll();
        return roleList;
    }


   @Test
    public void test(){
       System.out.println("test");
   }
}
